

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>试卷管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <#assign currentMenu="exam"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>试卷预览</h1>
        </section>
        <section class="content">
            <div class="box" style="padding: 10px">
                <div class="row">

                    <div class="col-md-offset-4 col-md-8">
                        <h1 class="col-md-offset-1">${exams.title}</h1>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="col-md-4">时间：${exams.exam_minute}分钟 </div>
                                <div class="col-md-4">总分：${exams.total_score}分</div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-default">
                    <#assign  SingtotalScore = 0>
                    <#assign  MulttotalScore = 0>
                    <#assign  judgetotalScore = 0>
                    <#assign  answer = "">
                    <div class="panel-heading">
                        <h3>一、单选题（共<span id="SingtotalScore"></span>分）</h3>
                    </div>
                    <#list exams.questions as e>
                    <div class="panel-body">
                        <#if e.type = 1>
                        <p>${e.title}<span>（${e.score}分）</span></p>
                        <#list e.answers as a>
                        <p>${a.title}</p>
                            <#assign answer+=a.showAnswer>
                        </#list>

                        <div style="color:red">正确答案：${answer}</div>
                            <#assign  answer = "">
                            <#assign SingtotalScore+=e.score>
                        </#if>

                    </div>

                    </#list>

                    <#assign  answer = "">


                      <#assign answerStr = ''>
                        <h3>二、多选题（共<span id="MulttotalScore"></span>分）</h3>
                    <#list exams.questions as e>
                    <div class="panel-body">
                        <#if  e.type =2>
                        <p>${e.title}<span>（${e.score}分）</span></p>
                        <#list e.answers as a>
                            <p>${a.title}</p>
                            <#assign answer+=a.showAnswer>
                        </#list>
                        <div style="color:red">正确答案：${answer}</div>
                        <#assign  answer = "">
                    </div>
                        <#assign MulttotalScore+=e.score>
                        <#assign judgetotalScore+=e.score>
                  </#if>
                    </#list>



                    <div class="panel-heading">
                        <h3>三、判断题（共<span id="judgetotalScore"></span>分）</h3>
                    </div>
                    <#list exams.questions as e>
                        <#if e.type = 3>
                    <div class="panel-body">

                        <#list e.answers as a>
                            <p>${a.q_title}}<span>（${e.score}分）</span></p>
                        <div style="color:red">正确答案：${(e.judge_right == 1)?string("对","错")}</div>
                        </#list>
                    </div>

                </#if>
                    </#list>
                </div>

            </div>

        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
<script>
    $("#SingtotalScore").html(${SingtotalScore})
    $("#MulttotalScore").html(${MulttotalScore})
    $("#judgetotalScore").html(${judgetotalScore})
</script>
</body>
</html>
